package com.javatest;

/**
 * @author LL
 * 已知x+y+z=50,x+2y+5z=100,编写程序计算x,y,z的值
 * @create 2020-12-10 17:37
 */
public class Subject15 {

    public static void function(){
        for (int i = 0; i <= 50; i++) {
            for (int j = 0; j <= 50; j++) {
                for (int k = 0; k <= 50; k++) {
                    if((i+j+k == 50) && (i+2*j+5*k == 100)){
                        System.out.println("x:"+i+" y:"+j+" z:"+k);
                    }
                }
            }
        }
    }

    public static void main(String[] args) {
        function();
    }
}
